feat: short bar mode for timer widgets#358
Open
t-benoit wants to merge 1 commit intosirmalloc:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SessionUsageandWeeklyUsagealready support a "short bar" (slider) display mode via the(p)rogress togglekeybind. The three timer widgets in the Usage category did not — their cycle stopped atmedium bar. This PR enables slider modes on all of them:BlockTimerBlockResetTimerWeeklyResetTimerNew cycle for each:
time → long bar (32) → medium bar (16) → short bar (10) → short bar (no %) → time
Visual
Block Timer:
Block: 3hr 45m # time
Block [████████████████░░░░░░░░░░░░░░░░] 50.0% # long bar
Block [████████░░░░░░░░] 50.0% # medium bar
Block ▓▓▓▓▓░░░░░ 50.0% # short bar (new)
Block ▓▓▓▓▓░░░░░ # short bar only (new)
Block Reset Timer / Weekly Reset Timer behave identically (different label).
Notes
(v)invert fillis now also exposed in slider modes (previously only in progress modes).Test plan
bun run lint(tsc + eslint, 0 warnings)bun test— 1164 tests pass; ~5–6 new tests per widget covering slider rendering (elapsed, slider-only, inverted), the new invert keybind in slider mode, and theshort bar/short bar onlymodifier text.BlockTimeradditionally covers the empty-fallback slider renderingp, togglevin slider mode, verify hours-only/compact/absolute metadata are stripped on entering bar modes